Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODStorageUnitView


CloneInto

The CloneInto method copies to the specified destination storage unit all properties and values of the storage unit that created this storage-unit view.

void CloneInto (in ODDraftKey key, 
                in ODStorageUnit destStorageUnit, 
                in ODID scopeID);
key
The draft key identifying this cloning operation.
destStorageUnit
A reference to the destination storage unit to which the data is to be copied.
scopeID
The ID of the frame that defines the scope of this cloning operation.
DISCUSSION
This method is not called by parts. Your part should call its draft's Clone or WeakClone method instead of this method.

The storage unit that created this storage-unit view is the source storage unit for the cloning operation.

If the source storage unit has persistent references to other objects, the scopeID parameter determines which of the referenced objects are within the scope of this cloning operation. Typically, the scopeID parameter is the ID of a frame, and only those objects embedded in that frame are within scope. In the rare case in which the scopeID parameter is kODIDAll, all referenced objects are within scope.

This method copies data from the source storage unit into the specified destination storage unit. If the source storage unit has persistent references to other objects, this method clones any persistently referenced objects that are within the scope of this cloning operation. Objects reference by strong persistent references are strongly cloned by recursive calls to the Clone method; objects referenced by weak persistent references are weakly cloned by calls to the WeakClone method.

EXCEPTIONS
kODErrInvalidDraftKey
The specified draft key is not the draft key for the current cloning transaction.
If the storage-unit cursor for this storage-unit view does not represent a legal focus context for the storage unit that created this storage-unit view, this method throws exceptions raised by the FocusWithCursor method of that storage unit.

SEE ALSO
The ODDraftKey type (page 902).
The ODID type (page 899).
The ODDraft::Clone method (page 162).
The ODDraft::WeakClone method (page 185).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help